Integrand size = 31, antiderivative size = 106 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=-\frac {i \cos ^5(c+d x)}{5 a^3 d}+\frac {4 i \cos ^7(c+d x)}{7 a^3 d}+\frac {\sin (c+d x)}{a^3 d}-\frac {2 \sin ^3(c+d x)}{a^3 d}+\frac {9 \sin ^5(c+d x)}{5 a^3 d}-\frac {4 \sin ^7(c+d x)}{7 a^3 d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {3171, 3169, 2713, 2645, 30, 2644, 276, 14} \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=-\frac {4 \sin ^7(c+d x)}{7 a^3 d}+\frac {9 \sin ^5(c+d x)}{5 a^3 d}-\frac {2 \sin ^3(c+d x)}{a^3 d}+\frac {\sin (c+d x)}{a^3 d}+\frac {4 i \cos ^7(c+d x)}{7 a^3 d}-\frac {i \cos ^5(c+d x)}{5 a^3 d} \]
[In]
[Out]
Rule 14
Rule 30
Rule 276
Rule 2644
Rule 2645
Rule 2713
Rule 3169
Rule 3171
Rubi steps \begin{align*} \text {integral}& = \frac {i \int \cos ^4(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^3 \, dx}{a^6} \\ & = \frac {i \int \left (-i a^3 \cos ^7(c+d x)-3 a^3 \cos ^6(c+d x) \sin (c+d x)+3 i a^3 \cos ^5(c+d x) \sin ^2(c+d x)+a^3 \cos ^4(c+d x) \sin ^3(c+d x)\right ) \, dx}{a^6} \\ & = \frac {i \int \cos ^4(c+d x) \sin ^3(c+d x) \, dx}{a^3}-\frac {(3 i) \int \cos ^6(c+d x) \sin (c+d x) \, dx}{a^3}+\frac {\int \cos ^7(c+d x) \, dx}{a^3}-\frac {3 \int \cos ^5(c+d x) \sin ^2(c+d x) \, dx}{a^3} \\ & = -\frac {i \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}+\frac {(3 i) \text {Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {\text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{a^3 d} \\ & = \frac {3 i \cos ^7(c+d x)}{7 a^3 d}+\frac {\sin (c+d x)}{a^3 d}-\frac {\sin ^3(c+d x)}{a^3 d}+\frac {3 \sin ^5(c+d x)}{5 a^3 d}-\frac {\sin ^7(c+d x)}{7 a^3 d}-\frac {i \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{a^3 d} \\ & = -\frac {i \cos ^5(c+d x)}{5 a^3 d}+\frac {4 i \cos ^7(c+d x)}{7 a^3 d}+\frac {\sin (c+d x)}{a^3 d}-\frac {2 \sin ^3(c+d x)}{a^3 d}+\frac {9 \sin ^5(c+d x)}{5 a^3 d}-\frac {4 \sin ^7(c+d x)}{7 a^3 d} \\ \end{align*}
Time = 0.84 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.41 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {3 i \cos (c+d x)}{16 a^3 d}+\frac {i \cos (3 (c+d x))}{8 a^3 d}+\frac {i \cos (5 (c+d x))}{20 a^3 d}+\frac {i \cos (7 (c+d x))}{112 a^3 d}+\frac {5 \sin (c+d x)}{16 a^3 d}+\frac {\sin (3 (c+d x))}{8 a^3 d}+\frac {\sin (5 (c+d x))}{20 a^3 d}+\frac {\sin (7 (c+d x))}{112 a^3 d} \]
[In]
[Out]
Time = 0.82 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.80
method | result | size |
risch | \(\frac {i {\mathrm e}^{-3 i \left (d x +c \right )}}{8 d \,a^{3}}+\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{20 d \,a^{3}}+\frac {i {\mathrm e}^{-7 i \left (d x +c \right )}}{112 d \,a^{3}}+\frac {3 i \cos \left (d x +c \right )}{16 d \,a^{3}}+\frac {5 \sin \left (d x +c \right )}{16 a^{3} d}\) | \(85\) |
derivativedivides | \(\frac {\frac {2}{16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+16 i}+\frac {4 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{6}}-\frac {9 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {17 i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}-\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{7}}+\frac {38}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {15}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {15}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{d \,a^{3}}\) | \(141\) |
default | \(\frac {\frac {2}{16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+16 i}+\frac {4 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{6}}-\frac {9 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {17 i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}-\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{7}}+\frac {38}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {15}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {15}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{d \,a^{3}}\) | \(141\) |
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.59 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {{\left (-35 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 140 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 28 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{560 \, a^{3} d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (95) = 190\).
Time = 0.26 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.86 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\begin {cases} \frac {\left (- 71680 i a^{12} d^{4} e^{17 i c} e^{i d x} + 286720 i a^{12} d^{4} e^{15 i c} e^{- i d x} + 143360 i a^{12} d^{4} e^{13 i c} e^{- 3 i d x} + 57344 i a^{12} d^{4} e^{11 i c} e^{- 5 i d x} + 10240 i a^{12} d^{4} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{1146880 a^{15} d^{5}} & \text {for}\: a^{15} d^{5} e^{16 i c} \neq 0 \\\frac {x \left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 7 i c}}{16 a^{3}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.12 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {\frac {35}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {525 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1960 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 4025 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 4480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3143 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1176 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 243}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{7}}}{280 \, d} \]
[In]
[Out]
Time = 25.11 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.26 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=-\frac {\left (35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,105{}\mathrm {i}-175\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,105{}\mathrm {i}-7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,77{}\mathrm {i}+43\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-13{}\mathrm {i}\right )\,2{}\mathrm {i}}{35\,a^3\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^7} \]
[In]
[Out]